package com.neusoft.ysu.populationmanagement.controller;


import com.neusoft.ysu.populationmanagement.entity.CommonResult;
import com.neusoft.ysu.populationmanagement.service.IVOperatorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * VIEW 前端控制器
 * </p>
 *
 * @author 作者：张幸晔
 * @since 2024-06-22
 */
@RestController
@RequestMapping("/v-operator")
@CrossOrigin
public class VOperatorController {

    @Autowired
    private IVOperatorService operatorService;
    /**
     * @param username
     * @param password
     * @return CommonResult
     * @description 登录函数迁移到这
     * @author 张幸晔
     * @date 2024-06-22 10:14
     */

    @RequestMapping("login")
    public CommonResult login(String username, String password){
        return operatorService.login(username,password);
    }
}
